#include <iostream>
using std::cout;
using std::endl;

class Point{
public:
    Point(int x,int y)
    : _ix(x) //const int _ix = x
    , _iy(y) //const int _iy = y
    {
        cout <<"Point(int,int)" << endl;
    }

#if 1
    //参数为const Point * const this
    void print() const {
        cout << "(" << _ix << ","
            << _iy << ")" << endl;
        cout << "const版本的print" << endl;
    }
#endif
    //参数为Point * const this
    //构成了重载
#if 0
    void print() {
        cout << "(" << _ix << ","
            << _iy << ")" << endl;
        cout << "非const版本的print" << endl;
    }
#endif
private:
    int _ix;
    int _iy;
};

void test0(){
    /* Point pt(3,4); */
    /* pt.print(); */

    /* const int a = 100; */
    const Point pt2(1,2);
    /* pt2.print(); */

}

int main(void){
    test0();
    return 0;
}
